import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] arr=new int[]{1,1,2,2,2,2,4,4,3,2};
        Arrays.sort(arr);
        System.out.println(num(arr));
    }
    public static int num(int[] arr){
        int mid=arr.length/2;
        return arr[mid];
    }
}
